package com.mygo.designPattern.behavioral.strategicDesignPattern.discount;

import com.mygo.designPattern.behavioral.strategicDesignPattern.DiscountStrategy;

import java.math.BigDecimal;

// 30% 折扣策略
public class ThirtyPercentDiscountStrategy implements DiscountStrategy {
    @Override
    public BigDecimal applyDiscount(BigDecimal price) {
        return price.multiply(BigDecimal.valueOf(0.7));
    }
}
